﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages"
    Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AddRemoveDepartmentWebPartUserControl.ascx.cs"
    Inherits="Motesrummet.Web.AddRemoveDepartmentWebPart.AddRemoveDepartmentWebPartUserControl" %>
<asp:HiddenField ID="hdnSelectedTab" runat="server" Value="0" />

<%--<SharePoint:ScriptLink Name="/_layouts/Motesrummet.Web/Scripts/jquery-1.8.3.js" runat="server" OnDemand="true" LoadAfterUI="true" Localizable="false"></SharePoint:ScriptLink>
<SharePoint:ScriptLink Name="/_layouts/Motesrummet.Web/Scripts/jquery-ui.js" runat="server" OnDemand="true" LoadAfterUI="true" Localizable="false"></SharePoint:ScriptLink>
--%>
<link rel="stylesheet" type="text/css" href="/_layouts/Motesrummet.Web/dialog.css" />
<link rel="stylesheet" type="text/css" href="/_layouts/Motesrummet.Web/jquery-ui.css" />
<script src="/sites/stockholm/_layouts/Motesrummet.Web/Scripts/jquery-1.8.3.js" type="text/javascript"></script>
<script src="/sites/stockholm/_layouts/Motesrummet.Web/Scripts/jquery-ui.js" type="text/javascript"></script>
<script src="/sites/stockholm/_layouts/Motesrummet.Web/Scripts/jquery.validate.js" type="text/javascript"></script>


<script type="text/javascript">
$(function () {
   $("#tabs").tabs({
       show: function() {
          var selectedTab = $('#tabs').tabs('option', 'selected');
          $("#<%= hdnSelectedTab.ClientID %>").val(selectedTab);
          },
       selected: ("#<%= hdnSelectedTab.Value %>")
   });
 });
</script>

<script type="text/javascript">
    function validator() {
        var URL = document.getElementById("#<%= txt_Url.ClientID %>").value;

        if (URL == "" || URL == null) {
            var myError = "Enter a URL-name";
            alert(myError);
            return false;
        }

</script>



<div class="container">
<form id="form" action="" method="get">
<div id="tabs">
    <ul>
        <li><a href="#tabs-1">Lagg till...</a></li>
        <li><a href="#tabs-2">Ta bort...</a></li>
    </ul>
<div id="tabs-1">
    <div class="myText">
        <p>
            Url:</p>
        <asp:TextBox ID="txt_Url" runat="server"></asp:TextBox>
        <br />
        <p>
            Titel:</p>
        <asp:TextBox ID="txt_Title" runat="server"></asp:TextBox>
        <br />
        <p>
            Beskrivning:</p>
        <asp:TextBox ID="txt_Description" runat="server"></asp:TextBox>
        
    <br />
    <br />
    <asp:Button ID="btn_CreateSite" runat="server" Text="Skapa" OnClientClick="return validator();" OnClick="btn_CreateSite_Click"
        CssClass="myButton" Height="35px" Width="100px" Visible="true" />
            
    <br />
    <br />
    <asp:Label ID="lbl_CreateSite" runat="server" Text=""></asp:Label>
    </div>
    <br />
</div>

<div id="tabs-2">
<div class="myText">
    <p>Välj site:ite:</p>
    <asp:DropDownList ID="drpd_WebSites" runat="server" Width="100">
    </asp:DropDownList>
    <br />
    <br />
    <asp:Button ID="btn_DeleteSite" runat="server" Text="Ta bort" OnClick="btn_DeleteSite_Click"
        Height="35px" Width="100px" CssClass="myButton" />
    <br />
    <br />
    <asp:Label ID="lbl_DeleteSite" runat="server" Text=""></asp:Label>
    </div>
</div>
</div>
</form>
</div>



